import { request } from "@/utils/service"

/** 增 */
export function createOrderApi(data: any) {
  return request({
    url: "order/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteOrderApi(data: any) {
  return request({
    url: `order/delete`,
    method: "post",
    data
  })
}

/** 改 */
export function updateOrderApi(data: any) {
  return request({
    url: "order/update",
    method: "post",
    data
  })
}

/** 查 */
export function getOrderApi(params: any) {
  return request({
    url: "/order/list",
    method: "get",
    params
  })
}

// 详情
export function getOrderDetailApi(data: any) {
  return request({
    url: `order/byId`,
    method: "get",
    data
  })
}
